package animator.phantom.project;

/*
    Copyright Janne Liljeblad 2006,2007,2008

    This file is part of Phantom2D.

    Phantom2D is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Phantom2D is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Phantom2D.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.awt.Dimension;
import java.util.Vector;
import java.io.*;

public class MovieFormat
{
	private String name;
	private int framesPerSecond;
	private Dimension screenSize;
	private float aspectRatio = 1.0f;

	public static Vector<MovieFormat> formats = new Vector<MovieFormat>();

	public final static MovieFormat DEFAULT = new MovieFormat( "default", 25,  384, 288 );
	public final static MovieFormat PAL_SQUARE = new MovieFormat( "PAL Square", 25, 768, 576 );
	public final static MovieFormat NTSC_SQUARE = new MovieFormat( "NTSC Square", 30, 720, 540 );

	static
	{
		formats.add( DEFAULT );
		formats.add( PAL_SQUARE );
		formats.add( NTSC_SQUARE );
	}

	public MovieFormat(){}

	public MovieFormat( int framesPerSecond, int width, int height )
	{
		this.name = name;
		this.framesPerSecond = framesPerSecond;
		this.screenSize = new Dimension( width, height );
	}

	public MovieFormat( String name, int framesPerSecond, int width, int height )
	{
		this.name = name;
		this.framesPerSecond = framesPerSecond;
		this.screenSize = new Dimension( width, height );
	}
	public MovieFormat( String name, int framesPerSecond, int width, int height, float aspratio )
	{
		this.name = name;
		this.framesPerSecond = framesPerSecond;
		this.screenSize = new Dimension( width, height );
		this.aspectRatio = aspratio;
	}

	public String getName(){ return name; }
	public int getFPS(){ return framesPerSecond; }
	public Dimension getScreenSize(){ return screenSize; }

}//end class
